Subject: Set_Queue_Callback_Function

From: "Steve Berl" <[email-masked]>
Date: 28 Jun 1993 15:12:44 -0800

Subject:                              Time:  1:38 PM
  OFFICE MEMO         Set_Queue_Callback_Function           Date:  6/28/93
Chung-Huy Chen reguested recommendations for use of the system-dependent
parameters to Set_Queue_Callback_Function.

In the MacOS, I'd like to recommend that the parameter callback_function be a
UniversalProcPtr type (it is really a 32-bit address of a function
descriptor...). This acts as a pointer to a function that can also switch back
and forth between native and emulation mode on a PowerPC RISC processor. This
way the application and CPI-C implementation may be native or emulated code
independently.

I think that user_field is what Mac programmer's typically refer to as a refCon
field. It is 4 bytes that can be used for whatever the programmer wants.
Usually it is used as a pointer to a data structure. Some programmer's get real
clever about stuffing things into these fields. They will like the idea of
having 8 bytes available. I assume that CPI-C makes no attempt to interpret
these bytes.

I am not sure of the intent of the callback_info field. Can someone tell me
what was in mind when this was put into the call? Is it supposed to contain
system specific context information (for example, the contents of register A5
in a Mac program)? The text of the proposal seems to imply that it is
interpreted by the CPI-C implementation.

Is this the kind of recommendation that you had in mind?

Steve Berl